<template>
  <div class="preview-container">
  
    <div class="start-btn">
      <!-- <el-button  @click="startExam">开始考试</el-button> -->
        <el-button  @click="showRole">开始考试</el-button>
    </div>
    <div class="role-exam">
       <div class="btn">
        <el-button  @click="()=>this.$router.push({name:'QuickRequired'})" icon="el-icon-arrow-left">
        </el-button>
       </div>
    </div>

    <div class="role-exam">
      <img src="/images/bg/6.png" alt="">
      <!-- <el-card style="width: 97.8%;position: fixed; bottom: 10px; opacity: 0.3;">
          <el-button type="primary" @click="()=>this.$router.go(-1)" icon="el-icon-arrow-left">
          </el-button>
          <el-button type="primary" @click="startExam" icon="el-icon-arrow-right" style="float: right;">
          </el-button>
      </el-card> -->
      <div class="btn">
        <el-button  @click="backExam" icon="el-icon-arrow-left">
        </el-button>
        <el-button  @click="startExam" icon="el-icon-arrow-right" style="float: right;">
        </el-button>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  name: "PreviewRequired",
  data(){
    return{
      roleExam:false
    }
  },
  methods: {
    
    showRole(){
      this.roleExam = true
    },
    startExam() {
      this.$router.push({name:"StartResponder"})
      // this.$router.push({name:'StartRequired'})
    },
    backExam(){
      if(!this.roleExam){
        this.$router.go(-1)
        return
      }
      this.roleExam = false
    }
  }
}
</script>

<style scoped>
.preview-container {
  min-height: 100vh;
  /* background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%); */
  background-image: url("/images/bg/4.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* padding: 20px; */
}

.start-btn{
  position: relative;
}

.start-btn .el-button{
  width: 480px;
  height: 180px;
  position: absolute;
  bottom: -255px;
  left: -240px;
  /* border-radius: 10%; */
  opacity: 0;
}

.role-exam {
  width: 100%;
  height: 100%;
  display: flex;
}

.role-exam img{
  width: 100%;
  height: 100%;
}

.btn{
  width: 99%;
  bottom: 20px;
  position: fixed;
  opacity: 0.3;
  margin: 0 10px;
}


</style>